// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
//适配rem
import 'lib-flexible/flexible'
/*引入资源请求axios插件*/
import axios from 'axios';
/*使用axios插件*/
Vue.prototype.$axios = axios;
Vue.prototype.Ce_Host="ce_api";
//引入mint-ui库
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)
//引入fetch请求
import {fetch} from './axios/fetch'
Vue.prototype.$fetch=fetch;//定义全局变量

Vue.config.productionTip = false
//页面title
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
